Add The Arena: Community discussion platform with Supabase auth#3
Open
davidddeveloper wants to merge 17 commits intomasterfrom
Open
Add The Arena: Community discussion platform with Supabase auth#3davidddeveloper wants to merge 17 commits intomasterfrom
davidddeveloper wants to merge 17 commits intomasterfrom
Conversation
Implements a full-featured community platform with: - Supabase integration for database and auth - Magic link and OAuth (Google, GitHub) authentication - Rich text editor with Tiptap for creating posts - Post categories: Building, Ideas, Stories, Opportunities, Challenges - Threaded comments on posts - User profiles with bio, skills, and role - Settings page for profile management - Responsive design maintaining Tenacity aesthetic New pages: - /arena - Main community feed - /arena/login - Authentication page - /arena/new - Create new post - /arena/post/[slug] - Single post view - /arena/profile/[username] - User profile - /arena/settings - Profile settings Database schema included in supabase/migrations/ https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Fixes the Vercel deployment error "useSearchParams() should be wrapped in a suspense boundary". Extracted the client component that uses useSearchParams into a separate ArenaContent component and wrapped it with React Suspense in the page component. https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
…ages - Make Supabase browser client a singleton to prevent AbortError from multiple auth listeners being created - Show actual error message when post publishing fails https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
The auth callback was creating cookies via cookies().set() but then returning a new NextResponse.redirect() that didn't include them. Now cookies are set directly on the response object that gets returned. https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
Major improvements to The Arena: - Fix session state not updating after OAuth redirect by using getUser() for server-verified sessions, handling INITIAL_SESSION event, and adding visibility/focus listeners - Add loading states to OAuth buttons on login page - Implement working reactions feature with optimistic updates - Add delete post functionality with confirmation modal - Add edit post page at /arena/edit/[slug] - Fix RichTextEditor to properly parse JSON content for editing - Add copy-to-clipboard feedback on share button https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
- Add generateMetadata utility for consistent SEO across pages - Add post layout with dynamic metadata generation for individual posts - Improve arena layout with cleaner styling - Enhance arena-content with better spacing and structure - Add additional types to supabase types - Include Open Graph and Twitter card support for social sharing https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
- Redesign comment threads with minimal, slick UI - Hover-to-reveal actions (reply, edit, delete) - Smooth animations and transitions - Better visual hierarchy with nested replies - Add proper pagination for comments (5 per page) - Create dedicated bookmarks page at /arena/bookmarks - View all saved posts with pagination - Quick remove bookmark on hover - Empty state with call to action - Improve sign-out experience - Add confirmation modal before signing out - Loading state during sign-out process - Smooth transitions and backdrop blur - Add bookmarks link to user dropdown menu https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
- Rewrite auth-context with proper race condition handling - Use ref to prevent duplicate profile fetches - Skip INITIAL_SESSION event (handled manually) - Add debounced session check on focus/visibility - Auto-create profile if not exists - Improve auth callback route - Better error handling with specific error messages - Auto-create profile after OAuth login - Proper cookie options (path, sameSite, secure, httpOnly) - Update middleware for protected routes - Redirect to login with 'next' param for protected pages - Use getUser() instead of getSession() for verification - Update browser client with explicit auth options - persistSession, autoRefreshToken, detectSessionInUrl - Add server helpers for getting user/profile in SSR https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
- Remove singleton pattern from browser client - Create fresh client each time to ensure cookies are read - Skip middleware for /arena/auth/* routes - Let auth callback handle cookies without interference - Simplify auth context - Remove complex race condition handling - Let onAuthStateChange handle session updates naturally - Remove route protection from middleware - Let client-side handle redirects (already implemented in pages) - Let Supabase handle cookie options in callback - Don't override cookie settings that might conflict https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
- Remove category links from header (keep only in sidebar) - Add notifications bell icon placeholder - Add "Your Posts" link to dropdown menu - Make header more compact with backdrop blur - Cleaner navigation: Logo | The Arena | [Bell] [New Post] [Avatar] https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
- Add reading time estimate next to post date - Calculates based on ~200 words per minute - Add social share menu with Twitter/LinkedIn options - Share to X (Twitter) with post title and author - Share to LinkedIn with post URL - Copy link fallback - Add floating back to top button - Appears after scrolling 400px - Smooth scroll animation https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
- Create ThemeProvider context with light/dark/system options - Add dark mode CSS variables for arena colors - Add theme toggle button in header (sun/moon icons) - Persist theme preference in localStorage - Support system preference detection https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
…s, infinite scroll - Add follow/unfollow functionality on user profiles with follower/following counts - Implement notifications system with dropdown in header and dedicated page - Create notifications for follows, reactions, comments, replies, and mentions - Add @mentions in comments with autocomplete suggestions - Render mentions as clickable links to user profiles - Add infinite scroll toggle with localStorage persistence - Real-time notification updates via Supabase subscriptions https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
- Fix notifications 400 error by simplifying query (avoid foreign key hints) - Update theme context to handle hydration properly - Use CSS variables throughout Arena for dark mode support - Add horizontal scrollable categories on mobile - Fix notification dropdown hover contrast - Add scrollbar-hide utility class https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
…ality - Theme toggle now visible even when user isn't logged in - Centered "The Arena" text in navigation using absolute positioning - Fixed "mark all as read" button with proper event handling and loading state - Updated PostCard to use CSS variables for full dark mode support - Added dark mode variants for category badges - Moved hero section inside main content area for proper alignment with posts https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
- Updated all arena pages to use CSS variables for dark mode support: - bookmarks, login, new, notifications, profile, settings pages - Centered sidebar categories vertically on desktop for better visual balance - Fixed mobile nav overlap by hiding "The Arena" text on small screens - Replaced all hardcoded colors (#f7f5f3, #37322f, etc.) with CSS variables - Added responsive grid (2 cols mobile, 4 cols desktop) for profile stats https://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces "The Arena," a community discussion platform where users can share ideas, projects, stories, and opportunities. This feature includes user authentication via Supabase (magic links, Google, GitHub OAuth), post creation with rich text editing, categorization, tagging, and a discussion/comments system.
Key Changes
Authentication & User Management
AuthProvidercontext for managing user sessions across the app.env.local.example)Core Features
UI/UX Components
Database Integration
Notable Implementation Details
/arena/auth/callbackfor session exchangedate-fnsfor post/comment timestampshttps://claude.ai/code/session_01Ga6n9rgaGbtbcu7bq5imyi